package com.ztc.util.enums;

/**
 * Created by chengdong on 2017/9/5.
 */
public enum WalletLogType {

    BUYTICKETS(1, "购票"),
    REFUND(2, "退票"),
    RECHARGE(3, "充值"),
    WITHDRAWALS(4, "提现"),
    ONEGRADEIN(5, "一级返利收入"),
    TWOGRADEIN(6, "二级返利收入"),
    THREEGRADEIN(7, "三级返利收入"),
    PENALTYIN(8, "退票违约金"),
    PENALTYOUT(9, "退票违约金返还"),
    ONEGRADEOUT(10, "一级返利退票支出"),
    TWOGRADEOUT(11, "二级返利退票支出"),
    THREEGRADEOUT(12, "三级返利退票支出"),
    WITHDRAWALSFAILURE(13, "提现失败入账"),
    PRIVATECARINCOME(14, "顺风车收入"),
    PRIVATECAREXPEND(15, "顺风车退票支出"),
    EXPRESSPAY(16, "快递订单费支出"),
    EXPRESSINCOME(17, "快递订单退款入账"),
    EXPRESSMONEYINCOME(18, "快递费收入"),
    EXPRESSCOLLECTION(19, "代收货款入账");

    private int index;
    private String name;

    WalletLogType(int index, String name) {
        this.index = index;
        this.name = name;
    }

    public static String getName(int index) {
        for (WalletLogType c : WalletLogType.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }

    public int getIndex() {
        return index;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}